
<%@ page import="org.hr.xtime.absence.Request" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'request.label', default: 'Request')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-request" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-request" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list request">
			
				<g:if test="${requestInstance?.requestor}">
				<li class="fieldcontain">
					<span id="requestor-label" class="property-label"><g:message code="request.requestor.label" default="Requestor" /></span>
					
						<span class="property-value" aria-labelledby="requestor-label"><g:link controller="employee" action="show" id="${requestInstance?.requestor?.id}">${requestInstance?.requestor?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${requestInstance?.days}">
				<li class="fieldcontain">
					<span id="days-label" class="property-label"><g:message code="request.days.label" default="Days" /></span>
					
						<g:each in="${requestInstance.days}" var="d">
						<span class="property-value" aria-labelledby="days-label"><g:link controller="day" action="show" id="${d.id}">${d?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${requestInstance?.status}">
				<li class="fieldcontain">
					<span id="status-label" class="property-label"><g:message code="request.status.label" default="Status" /></span>
					
						<span class="property-value" aria-labelledby="status-label"><g:fieldValue bean="${requestInstance}" field="status"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${requestInstance?.requestDate}">
				<li class="fieldcontain">
					<span id="requestDate-label" class="property-label"><g:message code="request.requestDate.label" default="Request Date" /></span>
					
						<span class="property-value" aria-labelledby="requestDate-label"><g:formatDate date="${requestInstance?.requestDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${requestInstance?.approvalDate}">
				<li class="fieldcontain">
					<span id="approvalDate-label" class="property-label"><g:message code="request.approvalDate.label" default="Approval Date" /></span>
					
						<span class="property-value" aria-labelledby="approvalDate-label"><g:formatDate date="${requestInstance?.approvalDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${requestInstance?.approver}">
				<li class="fieldcontain">
					<span id="approver-label" class="property-label"><g:message code="request.approver.label" default="Approver" /></span>
					
						<span class="property-value" aria-labelledby="approver-label"><g:link controller="employee" action="show" id="${requestInstance?.approver?.id}">${requestInstance?.approver?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${requestInstance?.id}" />
					<g:link class="edit" action="approve" id="${dayInstance?.id}"><g:message code="default.button.approve.label"/></g:link>
					<g:link class="edit" action="disapprove" id="${dayInstance?.id}"><g:message code="default.button.disapprove.label" /></g:link>
					<g:link class="edit" action="cancel" id="${dayInstance?.id}"><g:message code="default.button.cancel.label" /></g:link>
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
